﻿@model RonYee.Models.News

@{
    ViewBag.Title = "NewsCreate";
    Layout = "~/Views/Shared/_LayoutOfSecondPage.cshtml";
}

<script type="text/javascript" src="@Url.Content("~/fckeditor/fckeditor.js")"></script>
<script src="@Url.Content("~/Scripts/RongeJs/vanadium.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/RongeJs/CheckValue.js")" type="text/javascript"></script>

@using (Html.BeginForm("NewsCreate", "News", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)

    <div class="line_top">
        <input class="Button1 ui-icons" title="添加新闻" value="添加" type="submit" />
    </div>
    <div class="box_padding">
        <h3><i class="ui-icons"></i>新闻信息</h3>
        <div class="box_top ui-icons"></div>
        <div class="box_bg"><div class="box_padding">
        <div class="border_line">
            <table width="100%" border="0" cellpadding="0" cellspacing="0"><tbody>
            <tr>
                <td class="tdName">新闻标题<span class="fontred">*</span></td>
            </tr>
            <tr>
                <td class="tdData"><input type="text" id="NewsTitle" name="NewsTitle" class=":required" /></td>
            </tr>
            <tr>
                <td class="tdName">新闻内容<span class="fontred">*</span></td>
            </tr>
            <tr>
                <td class="tdData">
                   <textarea id="Contents" name="Contents"  rows="12" cols="100%"></textarea>
                </td>
            </tr>
            <tr>
                <td class="tdName">新闻类别1<span class="fontred">*</span></td>
            </tr>
            <tr>
                <td class="tdData">
                  @{
                    List<SelectListItem> selectList = new List<SelectListItem>();
                    selectList.Add(new SelectListItem { Text = "--请新闻类型--", Value = "0", Selected = true });
                    foreach (object e in Enum.GetValues(typeof(RonYee.Models.Enum.NewsType1)))
                    {
                        selectList.Add(new SelectListItem { Text = Enum.GetName(typeof(RonYee.Models.Enum.NewsType1), e), Value = ((int)e).ToString() });
                    }
                       @Html.DropDownList("NewsType1", selectList);
                 } 
                </td>
            </tr>
            </tbody></table></div>
        </div></div>
        <div class="box_down ui-icons"></div>
    </div>
             
    <div class="line_top">
        <input class="Button1 ui-icons" title="添加新闻" value="添加" type="submit" />
    </div>

} 

<script type="text/javascript">
    CKEDITOR.replace('Contents');
</script>
